﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using KLY.DataModels;
using KLY.ServiceCore;
using KLY.Tools.Helper;

namespace KLY_Webs.Controllers
{
    public class DistinctApiController : ApiController
    {
        // GET api/DistinctApi/5
        public string GetCityInfo(string id)
        {
            var processer = new GetDistinctInfo(new GetProvinceRequest { id = id });
            var response = processer.Process();
            return JsonHelper.Serialize(response);
        }

        public string GetAllProvinceInfo()
        {
            var processer = new GetDistinctInfo(new GetProvinceRequest { id = "0" });
            var response =  processer.Process();
            return JsonHelper.Serialize(response);
        }
    }
}
